import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'



// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  // 代理跨域
  server: {
    proxy: {
      '/api': {
        // 网关服务器地址
        // target: 'http://localhost:5000',
        target: 'http://10.10.52.202:5000',
        // 是否跨域
        changeOrigin: true,
        // 路径重写
        rewrite: (path) => path.replace(/^\/api/, ''),
      }
    }
  },
  resolve: {
    alias: {
      "@": path.resolve("./src"),
    },
  },
})
